export const setFileKey = (fileName, area) => {
  let type = fileName.split('.')
  type = type[type.length - 1]
  try {
    const userId = utils.getUserinfo() ? utils.getUserinfo().userId : 'null'
    const time = new Date().getTime()
    return `${area}/${userId}-${time}.${type}`
  } catch (e) {
    return new Date().getTime() + '.' + type
  }
}

// 拼接图片域名
export const formatDomainUrl = (fileName) => {
  return import.meta.env.VITE_TENCENT_DOMAIN + fileName
}
